<?php
defined('IN_ADMIN') or exit('No permission resources.');
include $this->admin_tpl('header', 'admin');
?>
<div class="pad_10">
    <div class="table-list">

        <form method="post" action="?m=goods&c=goods&a=goods_view">

            <p>
                <input type="hidden" value="<?php echo $_GET['menuid'] ?>" name="menuid">
                <input type="hidden" name="pc_hash" value="<?=$_GET['pc_hash']?>">
                <input type="hidden" name="goods_id" value="<?=$_GET['id']?>">
                <input type="text" name="keyword">
                <input type="submit" value="搜索">
            </p>

        </form>

        <form name="smsform" action="?m=goods&c=goods&a=delete" method="post">
            <input type="hidden" value="goods" name="m">
            <input type="hidden" value="goods" name="c">
            <input type="hidden" value="init" name="a">
            <input type="hidden" value="<?php echo $_GET['menuid'] ?>" name="menuid">
            <table width="100%" cellspacing="0">
                <thead>
                <tr>
                    <th><input type="checkbox" id="check_box" onclick="selectall('ids[]');"></th>
                    <th>账号/密码</th>
                    <th>订单编号</th>
                    <th>接收QQ</th>
                    <th>支付时间</th>
                    <th>状态</th>
                    <th>操作</th>
                </tr>
                </thead>
                <tbody>
                <?php
                if (is_array($infos)) {
                    foreach ($infos as $info) {
                        ?>
                        <tr>
                            <td><input type="checkbox" name="ids[]" value="<?= $info['id'] ?>"></td>
                            <td align="center"><?= $info['username'] ?>----<?= $info['password'] ?></td>
                            <td align="center"><?= $info['order_on'] ?></td>
                            <td align="center"><?= $info['pay_qq'] ?></td>
                            <td align="center"><?php
                                if ($info['pay_time']) {
                                   echo $info['pay_time'];
                                }
                                ?></td>
                            <td>
                                <?php
                                    if ($info['is_deny'] == 2 || $info['is_deny']==3){
                                        echo '<font color="red" class="onError">已出售</font>';
                                    }else{
                                        echo '<font color="green" class="onCorrect">未出售</font>';
                                    }
                                ?>
                            </td>
                            <td align="center">
                                <a href="index.php?m=goods&c=goods&a=goods_info_del&id=<?= $info['id'] ?>&menuid=<?= $_GET['menuid'] ?>&pc_hash=<?= $_GET['pc_hash'] ?>">删除</a>
                            </td>
                        </tr>
                        <?php
                    }
                }
                ?>
                </tbody>
            </table>
                <div class="btn">
                    <label for="check_box"><?php echo L('selected_all')?>/<?php echo L('cancel')?></label>
                    <input name="submit" type="submit" class="button" value="<?php echo L('remove_all_selected')?>" onClick="return confirm('<?php echo L('confirm', array('message' => L('selected')))?>')">&nbsp;&nbsp;
                    <input type="button" value="已出售" class="button" value="<?php echo L('remove_all_selected')?>" onclick="return confirm('<?php echo L('confirm',array('message'=>'搜索售出的QQ'))?>')">
                </div>
            </div>
            <div id="pages"><?php echo $this->pages ?></div>
            <input type="hidden" name="pc_hash" value="<?=$_GET['pc_hash']?>">
        </form>

    </div>
</div>
<br>
<br>
</body>
</html>